package com.nbot.server.workers;

import org.jinterop.dcom.common.JIException;

import java.net.UnknownHostException;

/**
 * opc处理器接口
 */
public interface OpcWorker {
    /**
     * 报警间隔，即10分钟内有重复报警时，不再发送报警指令
     */
    //public static final int CHECK_ALL_POINT_INTERVAL = 1;

    /**
     * 读取数据点当前值
     *
     * @param opcKey
     */
    public String readData(String opcKey) throws JIException, UnknownHostException;

    /**
     * 检查数据库中opc布尔量（01量）报警，true/false（1/0）报警
     *
     * @return
     * @throws JIException
     * @throws UnknownHostException
     */
    public String checkAllPoint() throws JIException, UnknownHostException;


    /**
     * 检查数据库中所有数值量点是否越界（越界就报警）
     * @return
     * @throws JIException
     * @throws UnknownHostException
    */
    public void checkAllAnalogPoint() throws JIException, UnknownHostException;


    /**
     * 检查数据库中关联报警
     * @return
     * @throws JIException
     * @throws UnknownHostException
     */
    public void checkRelevanceAlarm() throws JIException, UnknownHostException;

    /**
     * 检查数据库中油井报警
     * @return
     * @throws JIException
     * @throws UnknownHostException
     */
    public String checkOilWell() throws JIException, UnknownHostException;

    /**
     * 检查数据库中油井报警
     * @return
     * @throws JIException
     * @throws UnknownHostException
     */
    public String checkWaterWell() throws JIException, UnknownHostException;

}
